package com.zhongke.cotrun.model.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

import javax.validation.constraints.NotNull;

@ApiModel(value = "用户资金明细表")
@Data
public class PayBankroll {
	
	@ApiModelProperty(value = "id主键", example = "123")
	@TableId(type = IdType.AUTO)
	@NotNull(message = "id不能为空")
    private Long id;     
	
    @ApiModelProperty(value = "用户表主键", example = "123")
    @NotNull(message = "用户表主键不能为空")
    private Long userInfoId;
    
    @ApiModelProperty(value = "订单表主键", example = "123")
    private Long orderId;
    
    @ApiModelProperty(value = "订单号", example = "123")    
    @NotNull(message = "订单号不能为空")
    private String orderCode;
    
    @ApiModelProperty(value = "金额", example = "1.00")    
    private double amount;
    
    @ApiModelProperty(value = "手续费", example = "1.00")    
    private double commission;
    
    @ApiModelProperty(value = "原余额", example = "1.00")    
    private double oldblance;
    
    @ApiModelProperty(value = "新余额", example = "1.00")    
    private double newblance;
    
    @ApiModelProperty(value = "资金方向", example = "income")    
    private String type;
    
    @ApiModelProperty(value = "资金状态0-待付款 1-待审核 2-成功 3-失败 4-审核不通过", example = "0")    
    private String state;
    
    @ApiModelProperty(value = "支付渠道 0-人工 1-余额 2-微信 3-支付宝 4-现金 5-储蓄卡 6-信用卡 7-转账", example = "0")    
    private String payType;
    
    @ApiModelProperty(value = "资金类型 0-赠金 1-充值 2-提现 3-订单", example = "0")    
    private String amType;
    
    @ApiModelProperty(value = "支付时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date payDate;    
        
    @ApiModelProperty(value = "备注", example = "123")   
    private String remarks;//备注
    @ApiModelProperty(value = "创建人", example = "123")  
    private Long createBy;
    @ApiModelProperty(value = "更新人", example = "123")  
    private Long updateBy;
    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createDate;    
    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateDate;    
    @ApiModelProperty(value = "删除标记（0：正常；1：回收站）", example = "0")    
    private String delFlag;
}
